package org.vm.cmbcdirect.component.dao.impl;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.vm.cmbcdirect.component.dao.FacePersonDao;
import org.vm.cmbcdirect.component.model.FacePerson;

/**
 * Created by violorch on 2016/03/25.
 */
public class FacePersonDaoImpl implements FacePersonDao {

    @Autowired
    private SqlSessionTemplate sqlSessionTemplate;

    public int deleteByPrimaryKey(String facepersonId) {
        return sqlSessionTemplate.delete("faceperson.deleteByPrimaryKey", facepersonId);
    }

    public int insert(FacePerson record) {
        return sqlSessionTemplate.insert("faceperson.insert", record);
    }

    public int insertSelective(FacePerson record) {
        return sqlSessionTemplate.insert("faceperson.insertSelective", record);
    }

    public FacePerson selectByPrimaryKey(String facepersonId) {
        return sqlSessionTemplate.selectOne("faceperson.selectByPrimaryKey", facepersonId);
    }

    public int updateByPrimaryKeySelective(FacePerson record) {
        return sqlSessionTemplate.update("faceperson.updateByPrimaryKeySelective", record);
    }

    public int updateByPrimaryKey(FacePerson record) {
        return sqlSessionTemplate.update("faceperson.updateByPrimaryKey", record);
    }
}
